import http from '@/utils/http'

const CreateNewAccountManager = {

  /**
   * 账户模块
   * @param {*} params
   * @returns
   */
  //新建账户
  async createAccount(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/createAccount`,
      data: params,
      method: 'POST'
    })
    return result;
  },
  //   账户列表
  async getAccountList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccountList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 我的客户列表
  async getCustListJson(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCustList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 初始化下拉框列表
  async initValue(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getBasicsdata`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户关系管理初始化列表
  async getAccRelList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccRelList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户关系管理添加账户
  async accRelMaintain(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/accRelMaintain`,
      data: params,
      method: 'POST'
    })
    return result;
  },
  //账户关系管理-查询省账户
  async getAccProList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccProList`,
      params: params,
      method: 'get'
    })
    return result;
  },
  //账户关系管理-查询集团账户
  async getAccountList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccountList`,
      params: params,
      method: 'get'
    })
    return result;
  },
  //账户关系管理-同步集团账户到省
  async accAutoSynch(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/accAutoSynch`,
      data: params,
      method: 'POST'
    })
    return result;
  },
  // 账户列表-查询付费记录
  async getPayHis(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getPayHis`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表-修改账户-初始化接口
  async getAccDetail(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccDetail`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表-纳税人信息详情
  async getAccTaxDetail(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccTaxDetail`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表-操作日志
  async getAccLogList(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccLogList`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表-审核纳税人
  async checkAccountAudit(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/checkAccountAudit`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表-审核历史
  async getAccAuditHis(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccAuditHis`,
      params: params,
      method: 'GET'
    })
    return result;
  },
  // 账户列表=账户修改
  async updateAccount(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/updateAccount`,
      data: params,
      method: 'post'
    })
    return result;
  },
  // 账户审核=审核查看信息
  async getAccTaxDetail(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getAccTaxDetail`,
      params: params,
      method: 'get'
    })
    return result;
  },
  // 账户修改审核=审核保存
  async saveAccAuditTax(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/saveAccAuditTax`,
      data: params,
      method: 'post'
    })
    return result;
  },
  // 修改账户的税信息
  async saveAccTax(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/saveAccTax`,
      data: params,
      method: 'post'
    })
    return result;
  },
  //账户-上传附件
  async saveCustFile(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/saveCustFile`,
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      data: params,
      method: 'post'
    })
    return result;
  },
  //账户-删除附件
  async modAccTaxFile(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/modAccTaxFile`,
      data: params,
      method: 'post'
    })
    return result;
  },
  // 账户-下载附件
  async getCustFile(params) {
    let result = await http({
      url: `${process.env.VUE_APP_CTX_CUST}/getCustFile`,
      params: params,
      headers: { 'Content-Type': 'application/json' },
      responseType: 'blob',
      method: 'get'
    })
    return result;
  },





}
export default CreateNewAccountManager
